home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 4
/
The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO
/
clang
/
3d_lib.zip
/
MXZ.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-09
|
876b
|
37 lines
/* Find maximum z coordinate in face
Copyright (c) 1988 by Gus O'Donnell
Revision history:
Version 1.00 February 29, 1988 As released.
Version 1.01 March 20, 1988 Created libraries for all
memory models
*/
#include "3d.h"
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <values.h>
double max_z (FACE this_face)
/* Find the maximum z coordinate in the face. */
{
double result;
CORNER *chandle; /* Pointer for traversing the corner list. */
chandle = this_face.first -> next;
result = -MAXDOUBLE;
while (chandle -> next != NULL)
{
if (chandle -> this -> coord [2] > result)
result = chandle -> this -> coord [2];
chandle = chandle -> next;
}
return(result);
}